<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%><!-- 引入标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>	
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
.gqjg {
	font-size: 12px;
	color: black;
	width: 100%;
	border-collapse: collapse;
	border: 1px solid;
	border-top: 1px black;
	border-right: 1px black;
	border-left: 1px black;
	border-bottom: 1px black;
}

#tbodyS tr:nth-of-type(odd) {
	background-color: rgb(143, 252, 255);
}
#tbodyS tr:nth-of-type(even) {
	background-color: rgb(255, 255, 255);
}
/* 删除按钮的css */
#DeleteStandard{
	 position: absolute;
	 top:45px;
	 right: 1141px;
}
th{
	height: 30px;
}
</style>
<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/jquery-1.12.4.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/statics/js/delete.js"></script>

</head>
<body>
	<div align="center">
		<table style="WIDTH: 60%" class="gqjg" border="1" cellspacing="0"
			bordercolor="#000000" cellpadding="0" id="td">
			<!--标题-->
			<thead>
				<tr style="height: 35px;font-size:25px; height: 70px;">
					<td colspan="7"><p align="center">帖子列表</p></td>
				</tr>
				<tr style="content: " class="t1">
					<td colspan="7" style="position:relative;">
						<form action="${pageContext.request.contextPath }/listShou.html" method="post">
						帖子标题：
						<input type="text"  name="title" value="${title}">
						<input type="submit" value='提交检索'/>
						</form>
					</td>
				</tr>
			</thead>

			<tbody id="tbodyS">
				<tr>
					<th>标题</th>
					<th>内容摘要</th>
					<th>作者</th>
					<th>发布时间</th>
					<th>操作</th>
				</tr>
				<c:forEach var="list" items="${list}">
					<tr>				
						<th>${list.title}</th>
						<th>${list.summary }</th>
						<th>${list.author }</th>
						<th>${list.createdate }</th>
						<th style="width 65px;" >
						<a href="${pageContext.request.contextPath }/listreply_detail.html?id=${list.id}"
						 style="color:rgba(63,42,109)">查看回复</a>&nbsp;&nbsp;||
						<span><a class="delete" href="javascript:;" StandardList="${list.id}">删除</a></span>
						</th>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<ul class="page-num-ul clearfix">
		
				<!-- 总条数、当前页数、总共页数 -->
				<span>共${totalCount }条记录&nbsp;&nbsp; ${currentPageNo }/${totalPageCount }页</span>
					<c:if test="${currentPageNo>1}">
					<a href="${pageContext.request.contextPath }/listShou.html?pageIndex=1">首页</a>
					<a href="${pageContext.request.contextPath }/listShou.html?pageIndex=${currentPageNo-1}&title=${title}">上一页</a>
					</c:if>
					<c:if test="${currentPageNo<totalPageCount}">
					<a href="${pageContext.request.contextPath }/listShou.html?pageIndex=${currentPageNo+1}&title=${title}" >下一页</a>
					<a href="${pageContext.request.contextPath }/listShou.html?pageIndex=${totalPageCount}">最后一页</a>
					</c:if>
				&nbsp;&nbsp;
			</ul>
	</div>
</body>
</html>